package cn.tedu._04mvc.controller;

import cn.tedu._04mvc.pojo.dto.AddCarDto;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.sql.SQLOutput;

@Controller
public class CatController {

    @RequestMapping("/v1/cars/add")
    @ResponseBody
    public String add(String brand,String license,Double price){
        System.out.println("品牌："+brand+"，车牌号："+license+"，价格："+price);
        return "添加完成了，老司机快开车吧！！！";
    }

    @RequestMapping("/v1/cars/add2")
    @ResponseBody
   public String add2(AddCarDto addCarDto){
        System.out.println(addCarDto);
        return "添加完成了，老司机快开车";
    }


}
